<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="../../../vue.js"></script>
    <title>Document</title>
  </head>
  <body>
    <!-- data如果是基本数据类型，无论增删改，都能触发响应式，因为基础数据的值不能修改，只能替换 -->

    <div id="app">
      <button @click="num++">{{num}}</button>
    </div>
    <script>
      const vm = new Vue({
        el: '#app',
        data() {
          return {
            num: 1,
          };
        },
      });
    </script>
  </body>
</html>
